desc 'Run features for all languages'
task :cucumber do
  dir = File.dirname(__FILE__)
  Dir["#{dir}/*"].each do |f|
    if File.directory?(f)
      lang = f[dir.length+1..-1]
      if examples_working?(lang)
        Dir.chdir(f) do
          puts "DIR: #{f}"
          rake('cucumber')
        end
      else
        STDERR.puts %{
!!!!!
!!!!!
!!!!! SKIPPING #{lang} (The examples are out of date - please help update them)
!!!!!
!!!!!
}
      end
    end
  end
end

task :default => :cucumber

def examples_working?(lang)
  !%w{}.index(lang)
end

def rake(args)
  ruby($0, args)
end
